<template>
  <view>
    <!-- 搜索组件 -->
    <Search></Search>
		<!-- 轮播图 -->
    <swiper class="swiper_con" autoplay indicator-dots interval=3000 circular>
      <swiper-item v-for="v in bannerList" :key="v.goods_id">
        <navigator><image :src="v.image_src" mode="widthFix" /></navigator>
      </swiper-item>
    </swiper>
		<!-- -->
  </view>
</template>

<script>
import Search from "../../components/Search";
import request from "../../request/request";
export default {
  components: {
    Search,
  },
  data() {
    return {
      bannerList: [],
    };
  },
  onLoad() {
    // 获取轮播图
    request({ url: "/home/swiperdata" }).then((res) => {
      this.bannerList = res;
    });
  },
  methods: {},
};
</script>

<style lang="less">
	.swiper_con,.swiper_con navigator {
		width: 100%;
		height: 340rpx;
	}
	image {
		width: 100%;
	}

</style>


